<?php
	defined('_JEXEC') or die('Restricted access');
?>
	<script type="text/javascript">
		// <![CDATA[
				jQuery.noConflict();
				jQuery(document).ready(function()
				{
					jQuery("#o_club").change(function () {
						var realvalues = new Array () ;
						var textvalues = new Array () ;
						var flag = 0 ;
						jQuery('#o_club option:selected').each(function(i, selected) {
							realvalues[i] = jQuery(selected).val();
						    textvalues[i] = jQuery(selected).text();
						    if(realvalues[i] == 'other'){
								flag = 1 ;
							}
						});
						if(flag == 0){
							jQuery(".fl_o_club").css('display','none') ;
						}else{
							jQuery(".fl_o_club").css('display','') ;
						}
			        });
					var realvalues = new Array () ;
					var textvalues = new Array () ;
					var flag = 0 ;
					jQuery('#o_club option:selected').each(function(i, selected) {
						realvalues[i] = jQuery(selected).val();
					    textvalues[i] = jQuery(selected).text();
					    if(realvalues[i] == 'other'){
							flag = 1 ;
						}
					});
					if(flag == 0){
						jQuery(".fl_o_club").css('display','none') ;
					}else{
						jQuery(".fl_o_club").css('display','') ;
					}	

					jQuery("#bation").change(function () {
						var realvalues1 = new Array () ;
						var textvalues1 = new Array () ;
						var flag1 = 0 ;
						jQuery('#bation option:selected').each(function(i, selected) {
							realvalues1[i] = jQuery(selected).val();
						    textvalues1[i] = jQuery(selected).text();
						    if(realvalues1[i] == 'other'){
								flag1 = 1 ;
							}
						});
						if(flag1 == 0){
							jQuery(".fl_o_bation").css('display','none') ;
						}else{
							jQuery(".fl_o_bation").css('display','') ;
						}
			        });
					var realvalues1 = new Array () ;
					var textvalues1 = new Array () ;
					var flag1 = 0 ;
					jQuery('#bation option:selected').each(function(i, selected) {
						realvalues1[i] = jQuery(selected).val();
					    textvalues1[i] = jQuery(selected).text();
					    if(realvalues1[i] == 'other'){
							flag1 = 1 ;
						}
					});
					if(flag1 == 0){
						jQuery(".fl_o_bation").css('display','none') ;
					}else{
						jQuery(".fl_o_bation").css('display','') ;
					}
                });
		// ]]>
	</script>

<div class="col width-100">
	<table width="100%">
		<?php if(!empty($this->data->member_id)):?>
		<tr>
			<td class="key">
				<label for="title">Member ID assigned</label>
			</td>
			<td>
				<strong><?php echo $this->data->member_id ; ?></strong>
			</td>
		</tr>
		<?php
		 	endif ;
			if(!empty($this->data->l_name) || !empty($this->data->f_name)):
		?>
		<tr>
			<td class="key">
				<label for="title">Member Name</label>
			</td>
			<td>
				<strong><?php echo $this->data->l_name.' '.$this->data->f_name ; ?></strong>
			</td>
		</tr>
		<?php endif ;?>
		<tr>
			<td class="key" width='100px'>
				<label for="title"><?php echo $this->configField['education']['caption']; ?></label>
			</td>
			<td>
				<?php echo $this->lists['education']; ?>
			</td>
			<td class="key" width='100px'>
				<label for="title"><?php echo $this->configField['income']['caption']; ?></label>
			</td>
			<td>
				<?php echo $this->lists['income']; ?>
			</td>
		</tr>
		<tr>
			<td class="key" align='right' width='100px'>
				<div class="fl_o_education" <?php if(empty($this->c->o_education)){ echo "style='display:none'" ; } ?> >
					<label for="title"><?php echo (empty($this->configField['o_education']['caption']) ? 'Other' : $this->configField['o_education']['caption'] ); ?></label>
				</div>
			</td>
			<td>
				<div class="fl_o_education" <?php if(empty($this->c->o_education)){ echo "style='display:none'" ; } ?> >
					<input type="text" title="type" maxlength="50" size="50" value="<?php echo $this->data->o_education; ?>" id="o_education" name="o_education" class="o_o_clubs" />
				</div>
			</td>
		</tr>
		<tr>
			<td class="key" width='100px' valign='top'>
				<label for="title"><?php echo $this->configField['bation']['caption'] ; ?></label>
			</td>
			<td>
				<?php echo $this->lists['bation']; ?>
			</td>
			<td class="key" width='100px' valign='top'>
				<label for="title"><?php echo $this->configField['o_club']['caption']; ?></label>
			</td>
			<td>
				<?php echo $this->lists['o_club']; ?>
			</td>
		</tr>
		<tr>
			<td class="key" align='right' width='100px'>
				<div class="fl_o_bation">
					<label for="title"><?php echo empty($this->configField['o_bation']['caption']) ? 'Other' : $this->configField['o_bation']['caption']; ?></label>
				</div>
			</td>
			<td>
				<div class="fl_o_bation">
					<input type="text" title="type" maxlength="50" size="50" value="<?php echo $this->data->o_bation; ?>" id="o_bation" name="o_bation" class="o_o_clubs" />
				</div>
			</td>
			<td class="key" align='right' width='100px'>
				<div class="fl_o_club">
					<label for="title"><?php echo $this->configField['o_o_clubs']['caption']; ?></label>
				</div>
			</td>
			<td>
				<div class="fl_o_club">
					<input type="text" title="type" maxlength="50" size="50" value="<?php echo $this->data->o_o_clubs; ?>" id="o_o_clubs" name="o_o_clubs" class="o_o_clubs" />
				</div>
			</td>
		</tr>
		<tr>
			<td colspan='4'>
				<a href="javascript:void(null)" onclick="javascript:Joomla.submitbutton('apply')">
					<img title="Save & Next" style="float: right ;" src="<?php echo JURI::base() .'/components/com_wrd/assets/images/save_next.png'?>">
				</a>
			</td>
		</tr>
	</table>
</div>